#include "Application.h"

#include <OgreException.h>

#define WIN32_LEAN_AND_MEAN
#include "windows.h"

#ifdef __cplusplus
extern "C" {
#endif

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
{
	try
    {
		Application application;
		
		if (application.initialise() && application.setup())
		{
			application.run();
		}
	}
	catch(Ogre::Exception &e)
	{
		MessageBox(NULL, e.getFullDescription().c_str(), "Well, this is embarrassing.. an Ogre exception has occured.", MB_OK | MB_ICONERROR | MB_TASKMODAL);
	}

	return 0;
}

#ifdef __cplusplus
}
#endif